3.15 \(\int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx\)

Optimal. Leaf size=39 \[ \frac {x}{b}-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b} \]

[Out]

x/b-arctanh(a^(1/2)*tanh(x)/(a+b)^(1/2))*(a+b)^(1/2)/b/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3191, 391, 206, 208} \[ \frac {x}{b}-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b} \]

Antiderivative was successfully verified.

[In]

Int[Sinh[x]^2/(a + b*Cosh[x]^2),x]

[Out]

x/b - (Sqrt[a + b]*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/(Sqrt[a]*b)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\sinh ^2(x)}{a+b \cosh ^2(x)} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\coth (x)\right )}{b}-\frac {(a+b) \operatorname {Subst}\left (\int \frac {1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{b}\\ &=\frac {x}{b}-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 36, normalized size = 0.92 \[ \frac {x-\frac {\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a}}}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sinh[x]^2/(a + b*Cosh[x]^2),x]

[Out]

(x - (Sqrt[a + b]*ArcTanh[(Sqrt[a]*Tanh[x])/Sqrt[a + b]])/Sqrt[a])/b

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 300, normalized size = 7.69 \[ \left [\frac {\sqrt {\frac {a + b}{a}} \log \left (\frac {b^{2} \cosh \relax (x)^{4} + 4 \, b^{2} \cosh \relax (x) \sinh \relax (x)^{3} + b^{2} \sinh \relax (x)^{4} + 2 \, {\left (2 \, a b + b^{2}\right )} \cosh \relax (x)^{2} + 2 \, {\left (3 \, b^{2} \cosh \relax (x)^{2} + 2 \, a b + b^{2}\right )} \sinh \relax (x)^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \relax (x)^{3} + {\left (2 \, a b + b^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x) + 4 \, {\left (a b \cosh \relax (x)^{2} + 2 \, a b \cosh \relax (x) \sinh \relax (x) + a b \sinh \relax (x)^{2} + 2 \, a^{2} + a b\right )} \sqrt {\frac {a + b}{a}}}{b \cosh \relax (x)^{4} + 4 \, b \cosh \relax (x) \sinh \relax (x)^{3} + b \sinh \relax (x)^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \relax (x)^{2} + 2 \, {\left (3 \, b \cosh \relax (x)^{2} + 2 \, a + b\right )} \sinh \relax (x)^{2} + 4 \, {\left (b \cosh \relax (x)^{3} + {\left (2 \, a + b\right )} \cosh \relax (x)\right )} \sinh \relax (x) + b}\right ) + 2 \, x}{2 \, b}, -\frac {\sqrt {-\frac {a + b}{a}} \arctan \left (\frac {{\left (b \cosh \relax (x)^{2} + 2 \, b \cosh \relax (x) \sinh \relax (x) + b \sinh \relax (x)^{2} + 2 \, a + b\right )} \sqrt {-\frac {a + b}{a}}}{2 \, {\left (a + b\right )}}\right ) - x}{b}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="fricas")

[Out]

[1/2*(sqrt((a + b)/a)*log((b^2*cosh(x)^4 + 4*b^2*cosh(x)*sinh(x)^3 + b^2*sinh(x)^4 + 2*(2*a*b + b^2)*cosh(x)^2
 + 2*(3*b^2*cosh(x)^2 + 2*a*b + b^2)*sinh(x)^2 + 8*a^2 + 8*a*b + b^2 + 4*(b^2*cosh(x)^3 + (2*a*b + b^2)*cosh(x
))*sinh(x) + 4*(a*b*cosh(x)^2 + 2*a*b*cosh(x)*sinh(x) + a*b*sinh(x)^2 + 2*a^2 + a*b)*sqrt((a + b)/a))/(b*cosh(
x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 + 2*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4
*(b*cosh(x)^3 + (2*a + b)*cosh(x))*sinh(x) + b)) + 2*x)/b, -(sqrt(-(a + b)/a)*arctan(1/2*(b*cosh(x)^2 + 2*b*co
sh(x)*sinh(x) + b*sinh(x)^2 + 2*a + b)*sqrt(-(a + b)/a)/(a + b)) - x)/b]

________________________________________________________________________________________

giac [A]  time = 0.13, size = 52, normalized size = 1.33 \[ -\frac {{\left (a + b\right )} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b} + \frac {x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="giac")

[Out]

-(a + b)*arctan(1/2*(b*e^(2*x) + 2*a + b)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*b) + x/b

________________________________________________________________________________________

maple [B]  time = 0.10, size = 183, normalized size = 4.69 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{b}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{b}+\frac {\sqrt {a}\, \ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{2 b \sqrt {a +b}}-\frac {\sqrt {a}\, \ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{2 b \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{2 \sqrt {a}\, \sqrt {a +b}}-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \sqrt {a}\, \tanh \left (\frac {x}{2}\right )+\sqrt {a +b}\right )}{2 \sqrt {a}\, \sqrt {a +b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)^2/(a+b*cosh(x)^2),x)

[Out]

-1/b*ln(tanh(1/2*x)-1)+1/b*ln(tanh(1/2*x)+1)+1/2/b*a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2-2*a^(1/2)*
tanh(1/2*x)+(a+b)^(1/2))-1/2/b*a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2+2*a^(1/2)*tanh(1/2*x)+(a+b)^(1
/2))+1/2/a^(1/2)/(a+b)^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2-2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))-1/2/a^(1/2)/(a+b)
^(1/2)*ln((a+b)^(1/2)*tanh(1/2*x)^2+2*a^(1/2)*tanh(1/2*x)+(a+b)^(1/2))

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 120, normalized size = 3.08 \[ -\frac {{\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a} b} + \frac {\log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a}} + \frac {x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)^2/(a+b*cosh(x)^2),x, algorithm="maxima")

[Out]

-1/4*(2*a + b)*log((b*e^(2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(2*x) + 2*a + b + 2*sqrt((a + b)*a)))/(sqrt(
(a + b)*a)*b) + 1/4*log((b*e^(-2*x) + 2*a + b - 2*sqrt((a + b)*a))/(b*e^(-2*x) + 2*a + b + 2*sqrt((a + b)*a)))
/sqrt((a + b)*a) + x/b

________________________________________________________________________________________

mupad [B]  time = 0.22, size = 79, normalized size = 2.03 \[ \frac {x}{b}+\frac {\mathrm {atan}\left (\frac {\sqrt {-a\,b^2}}{2\,a\,\sqrt {a+b}}+\frac {\sqrt {-a\,b^2}}{b\,\sqrt {a+b}}+\frac {{\mathrm {e}}^{2\,x}\,\sqrt {-a\,b^2}}{2\,a\,\sqrt {a+b}}\right )\,\sqrt {a+b}}{\sqrt {-a\,b^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(x)^2/(a + b*cosh(x)^2),x)

[Out]

x/b + (atan((-a*b^2)^(1/2)/(2*a*(a + b)^(1/2)) + (-a*b^2)^(1/2)/(b*(a + b)^(1/2)) + (exp(2*x)*(-a*b^2)^(1/2))/
(2*a*(a + b)^(1/2)))*(a + b)^(1/2))/(-a*b^2)^(1/2)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(x)**2/(a+b*cosh(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________